Authentication


In [1]:
# Code from MTSW 2Ed.
# cf. https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition

import twitter

def oauth_login():
    # XXX: Go to http://twitter.com/apps/new to create an app and get values
    # for these credentials that you'll need to provide in place of these
    # empty string values that are defined as placeholders.
    # See https://dev.twitter.com/docs/auth/oauth for more information 
    # on Twitter's OAuth implementation.
    
    CONSUMER_KEY = 
    CONSUMER_SECRET =
    OAUTH_TOKEN = 
    OAUTH_TOKEN_SECRET = 
    auth = twitter.oauth.OAuth(OAUTH_TOKEN, OAUTH_TOKEN_SECRET,
                               CONSUMER_KEY, CONSUMER_SECRET)
    
    twitter_api = twitter.Twitter(auth=auth)
    return twitter_api

# Sample usage
twitter_api = oauth_login()    


import sys
import time
from urllib2 import URLError
from httplib import BadStatusLine
import json
import twitter


def make_twitter_request(twitter_api_func, max_errors=10, *args, **kw): 
    
    # A nested helper function that handles common HTTPErrors. Return an updated
    # value for wait_period if the problem is a 500 level error. Block until the
    # rate limit is reset if it's a rate limiting issue (429 error). Returns None
    # for 401 and 404 errors, which requires special handling by the caller.
    
    def handle_twitter_http_error(e, wait_period=2, sleep_when_rate_limited=True):
    
        if wait_period > 3600: # Seconds
            print >> sys.stderr, 'Too many retries. Quitting.'
            raise e
    
        # See https://dev.twitter.com/docs/error-codes-responses for common codes
    
        if e.e.code == 401:
            print >> sys.stderr, 'Encountered 401 Error (Not Authorized)'
            return None
        elif e.e.code == 404:
            print >> sys.stderr, 'Encountered 404 Error (Not Found)'
            return None
        elif e.e.code == 429: 
            print >> sys.stderr, 'Encountered 429 Error (Rate Limit Exceeded)'
            if sleep_when_rate_limited:
                print >> sys.stderr, "Retrying in 15 minutes...ZzZ..."
                sys.stderr.flush()
                time.sleep(60*15 + 5)
                print >> sys.stderr, '...ZzZ...Awake now and trying again.'
                return 2
            else:
                raise e # Caller must handle the rate limiting issue
        elif e.e.code in (500, 502, 503, 504):
            print >> sys.stderr, 'Encountered %i Error. Retrying in %i seconds' % \
                (e.e.code, wait_period)
            time.sleep(wait_period)
            wait_period *= 1.5
            return wait_period
        else:
            raise e

    # End of nested helper function
    
    wait_period = 2 
    error_count = 0 

    while True:
        try:
            return twitter_api_func(*args, **kw)
        except twitter.api.TwitterHTTPError, e:
            error_count = 0 
            wait_period = handle_twitter_http_error(e, wait_period)
            if wait_period is None:
                return
        except URLError, e:
            error_count += 1
            time.sleep(wait_period)
            wait_period *= 1.5
            print >> sys.stderr, "URLError encountered. Continuing."
            if error_count > max_errors:
                print >> sys.stderr, "Too many consecutive errors...bailing out."
                raise
        except BadStatusLine, e:
            error_count += 1
            time.sleep(wait_period)
            wait_period *= 1.5
            print >> sys.stderr, "BadStatusLine encountered. Continuing."
            if error_count > max_errors:
                print >> sys.stderr, "Too many consecutive errors...bailing out."
                raise



from functools import partial
from sys import maxint

def get_friends_followers_ids(twitter_api, screen_name=None, user_id=None,
                              friends_limit=maxint, followers_limit=maxint):
    
    # Must have either screen_name or user_id (logical xor)
    assert (screen_name != None) != (user_id != None), \
    "Must have screen_name or user_id, but not both"
    
    # See https://dev.twitter.com/docs/api/1.1/get/friends/ids and
    # https://dev.twitter.com/docs/api/1.1/get/followers/ids for details
    # on API parameters
    
    get_friends_ids = partial(make_twitter_request, twitter_api.friends.ids, 
                              count=5000)
    get_followers_ids = partial(make_twitter_request, twitter_api.followers.ids, 
                                count=5000)

    friends_ids, followers_ids = [], []
    
    for twitter_api_func, limit, ids, label in [
                    [get_friends_ids, friends_limit, friends_ids, "friends"], 
                    [get_followers_ids, followers_limit, followers_ids, "followers"]
                ]:
        
        if limit == 0: continue
        
        cursor = -1
        while cursor != 0:
        
            # Use make_twitter_request via the partially bound callable...
            if screen_name: 
                response = twitter_api_func(screen_name=screen_name, cursor=cursor)
            else: # user_id
                response = twitter_api_func(user_id=user_id, cursor=cursor)

            if response is not None:
                ids += response['ids']
                cursor = response['next_cursor']
        
            print >> sys.stderr, 'Fetched {0} total {1} ids for {2}'.format(len(ids), 
                                                    label, (user_id or screen_name))
        
            # XXX: You may want to store data during each iteration to provide an 
            # an additional layer of protection from exceptional circumstances
        
            if len(ids) >= limit or response is None:
                break

    # Do something useful with the IDs, like store them to disk...
    return friends_ids[:friends_limit], followers_ids[:followers_limit]

Helper Functions


In [2]:
#importing libraries
import json   #for pretty printing
import time   #for calculating Tweets per day
import operator #for sorting dictionaries
from collections import Counter #for turning lists to dictionaries etc.
    
# helper function: safe the results as a csv-file

#import & export CSV
import csv

def impCSV(input_file):
    '''
    input_file = csv with keys: "URL", "Twitter"
    output = list of dictionaries
    '''
    f = open(input_file, 'r')
    d = csv.DictReader(f)
    LoD = []   # list of dictionaries
    for row in d:
        LoD.append(row)
    f.close()
    return LoD

def exp2CSV(listOfDict, filename):
    '''
    arguments = list of dictionaries, filename
    output = saves file to cwd (current working directory)
    '''
    outputfile = filename
    keyz = listOfDict[0].keys()
    f = open(outputfile,'w')
    dict_writer = csv.DictWriter(f,keyz)
    dict_writer.writer.writerow(keyz)
    dict_writer.writerows(listOfDict)
    f.close()

1. Analyzing the Library's Network

1.2. Getting & Calculating Intersection & Differences: are they following back?


In [3]:
# getting Friends & Followers

def getFnFs(screen_name):
    '''
    input = screen name of a library
    output = dictionary with IDs of FnFs, IDs of reciprocal following and stats
    '''
    FnFdict = {}
    FnFdict['screen_name'] = screen_name
     
    friends_ids, followers_ids = get_friends_followers_ids(twitter_api,screen_name)    
        
    FnFdict['friends_ids'] = friends_ids
    FnFdict['followers_ids'] = followers_ids

    # Reciprocal Following?
    FnFdict['friends_ids'], FnFdict['followers_ids'] = set(FnFdict['friends_ids']), set(FnFdict['followers_ids'])
    FnFdict['followBack'] = FnFdict['friends_ids'].intersection(FnFdict['followers_ids'])
    FnFdict['followBackCount'] = len(FnFdict['followBack'])   #Nr of reciprocal following
    FnFdict['XFollowsNotBack'] = len(FnFdict['followers_ids'].difference(FnFdict['friends_ids']))   #Nr of accounts, screen_name is not following back
    FnFdict['NotFollowXBack'] = len(FnFdict['friends_ids'].difference(FnFdict['followers_ids']))   #Nr of accounts which are not following screen_name back
    if len(FnFdict['followers_ids']) != 0:
        FnFdict['activeNotFollowRatio'] = round((1.0*(FnFdict['XFollowsNotBack']))/len(FnFdict['followers_ids']),2)  #Ratio of screen_name not following back
    else:
        FnFdict['activeNotFollowRatio'] = 0
    if len(FnFdict['friends_ids']) != 0:
        FnFdict['passiveNotFollowRatio'] = round((1.0*(FnFdict['NotFollowXBack']))/len(FnFdict['friends_ids']),2)    #Ratio of accounts not following screen_name back
    else:
        FnFdict['passiveNotFollowRatio'] = 0
    FnFdict['friends_ids'] = list(FnFdict['friends_ids']) #convert friends & followers & followBack ids back to list instead of set
    FnFdict['followers_ids'] = list(FnFdict['followers_ids'])
    FnFdict['followBack'] = list(FnFdict['followBack'])
    return FnFdict

In [4]:
def wrapUp(csvFile):
    '''
    input: csv file ("OeBibBasicStats.csv, UniBibBasicStats.csv or NatBibBasicStats.csv") with keys 'screen_name' and 'location'
    output: csv files with dictionaries for each library as <screen_name>_NetWork_<datestamp>.csv
    prints out an short report
    '''
    import datetime
    datestamp = datetime.datetime.now().strftime('%Y-%m-%d')
    
    workLoD = impCSV(csvFile)
    
    
    for i in range(len(workLoD)):
        
        # add screen name & location of the library to dictionary
        workDict = {}
        workDict['screen_name'] = workLoD[i]['screen_name']
        workDict['libLocation'] = workLoD[i]['location']
        
        # Friends & Follower
        workDict.update(getFnFs(workDict['screen_name']))
        
        #creating the filename of the csv with current datestamp and save to csv
        l = [workDict] 
                
        filename = workDict['screen_name'] + '_NetWork_' + datestamp + '.csv'
        exp2CSV(l, filename)
        
        #print report
        print
        s = 'Report for ' + workDict['screen_name'] + ':'
        print s
        print len(s)*'='
        print 
        print 'File saved as', filename
        print
        print 'Friends:', len(workDict['friends_ids'])
        print 'Followers:', len(workDict['followers_ids'])
        print 'followBack:', workDict['followBackCount']
        print 'XFollowsNotBack:', workDict['XFollowsNotBack']
        print 'NotFollowXBack:', workDict['NotFollowXBack']
        print 'activeNotFollowRatio:', workDict['activeNotFollowRatio']
        print 'passiveNotFollowRatio:', workDict['passiveNotFollowRatio']
        print
        print 50*'='

Function call

National Libraries


In [5]:
wrapUp('NatBib_BasicStats_2014-04-06.csv')


Fetched 95 total friends ids for bsb_muenchen
Fetched 1722 total followers ids for bsb_muenchen
Fetched 85 total friends ids for dnb_aktuelles
Fetched 557 total followers ids for dnb_aktuelles
Report for bsb_muenchen:
========================

File saved as bsb_muenchen_NetWork_2014-04-06.csv

Friends: 95
Followers: 1722
followBack: 62
XFollowsNotBack: 1660
NotFollowXBack: 33
activeNotFollowRatio: 0.96
passiveNotFollowRatio: 0.35

==================================================

Fetched 0 total friends ids for sbb_news
Fetched 1312 total followers ids for sbb_news
Report for dnb_aktuelles:
=========================

File saved as dnb_aktuelles_NetWork_2014-04-06.csv

Friends: 85
Followers: 557
followBack: 36
XFollowsNotBack: 521
NotFollowXBack: 49
activeNotFollowRatio: 0.94
passiveNotFollowRatio: 0.58

==================================================

Report for sbb_news:
====================

File saved as sbb_news_NetWork_2014-04-06.csv

Friends: 0
Followers: 1312
followBack: 0
XFollowsNotBack: 1312
NotFollowXBack: 0
activeNotFollowRatio: 1.0
passiveNotFollowRatio: 0

==================================================

University Libraries


In [6]:
wrapUp('UniBib_BasicStats_2014-04-06.csv')


Fetched 27 total friends ids for ub_oldenburg
Fetched 164 total followers ids for ub_oldenburg
Fetched 166 total friends ids for hsubib
Fetched 697 total followers ids for hsubib
Report for ub_oldenburg:
========================

File saved as ub_oldenburg_NetWork_2014-04-06.csv

Friends: 27
Followers: 164
followBack: 27
XFollowsNotBack: 137
NotFollowXBack: 0
activeNotFollowRatio: 0.84
passiveNotFollowRatio: 0.0

==================================================

Fetched 25 total friends ids for ubhumboldtuni
Fetched 488 total followers ids for ubhumboldtuni
Report for hsubib:
==================

File saved as hsubib_NetWork_2014-04-06.csv

Friends: 166
Followers: 697
followBack: 81
XFollowsNotBack: 616
NotFollowXBack: 85
activeNotFollowRatio: 0.88
passiveNotFollowRatio: 0.51

==================================================

Fetched 20 total friends ids for kitbibliothek
Fetched 269 total followers ids for kitbibliothek
Report for ubhumboldtuni:
=========================

File saved as ubhumboldtuni_NetWork_2014-04-06.csv

Friends: 25
Followers: 488
followBack: 9
XFollowsNotBack: 479
NotFollowXBack: 16
activeNotFollowRatio: 0.98
passiveNotFollowRatio: 0.64

==================================================

Fetched 64 total friends ids for kizuulm
Fetched 143 total followers ids for kizuulm
Report for kitbibliothek:
=========================

File saved as kitbibliothek_NetWork_2014-04-06.csv

Friends: 20
Followers: 269
followBack: 8
XFollowsNotBack: 261
NotFollowXBack: 12
activeNotFollowRatio: 0.97
passiveNotFollowRatio: 0.6

==================================================

Fetched 48 total friends ids for subugoe
Fetched 181 total followers ids for subugoe
Report for kizuulm:
===================

File saved as kizuulm_NetWork_2014-04-06.csv

Friends: 64
Followers: 143
followBack: 42
XFollowsNotBack: 101
NotFollowXBack: 22
activeNotFollowRatio: 0.71
passiveNotFollowRatio: 0.34

==================================================

Fetched 218 total friends ids for ubbochum
Fetched 1068 total followers ids for ubbochum
Report for subugoe:
===================

File saved as subugoe_NetWork_2014-04-06.csv

Friends: 48
Followers: 181
followBack: 25
XFollowsNotBack: 156
NotFollowXBack: 23
activeNotFollowRatio: 0.86
passiveNotFollowRatio: 0.48

==================================================

Fetched 824 total friends ids for slubdresden
Fetched 3814 total followers ids for slubdresden
Report for ubbochum:
====================

File saved as ubbochum_NetWork_2014-04-06.csv

Friends: 218
Followers: 1068
followBack: 141
XFollowsNotBack: 927
NotFollowXBack: 77
activeNotFollowRatio: 0.87
passiveNotFollowRatio: 0.35

==================================================

Fetched 755 total friends ids for elibbremen
Fetched 1079 total followers ids for elibbremen
Report for slubdresden:
=======================

File saved as slubdresden_NetWork_2014-04-06.csv

Friends: 824
Followers: 3814
followBack: 591
XFollowsNotBack: 3223
NotFollowXBack: 233
activeNotFollowRatio: 0.85
passiveNotFollowRatio: 0.28

==================================================

Fetched 248 total friends ids for stabihh
Fetched 1726 total followers ids for stabihh
Report for elibbremen:
======================

File saved as elibbremen_NetWork_2014-04-06.csv

Friends: 755
Followers: 1079
followBack: 401
XFollowsNotBack: 678
NotFollowXBack: 354
activeNotFollowRatio: 0.63
passiveNotFollowRatio: 0.47

==================================================

Fetched 377 total friends ids for ub_tu_berlin
Fetched 877 total followers ids for ub_tu_berlin
Report for stabihh:
===================

File saved as stabihh_NetWork_2014-04-06.csv

Friends: 248
Followers: 1726
followBack: 183
XFollowsNotBack: 1543
NotFollowXBack: 65
activeNotFollowRatio: 0.89
passiveNotFollowRatio: 0.26

==================================================

Fetched 29 total friends ids for tubhh
Fetched 652 total followers ids for tubhh
Report for ub_tu_berlin:
========================

File saved as ub_tu_berlin_NetWork_2014-04-06.csv

Friends: 377
Followers: 877
followBack: 132
XFollowsNotBack: 745
NotFollowXBack: 245
activeNotFollowRatio: 0.85
passiveNotFollowRatio: 0.65

==================================================

Fetched 36 total friends ids for ulbbonn
Fetched 410 total followers ids for ulbbonn
Report for tubhh:
=================

File saved as tubhh_NetWork_2014-04-06.csv

Friends: 29
Followers: 652
followBack: 22
XFollowsNotBack: 630
NotFollowXBack: 7
activeNotFollowRatio: 0.97
passiveNotFollowRatio: 0.24

==================================================

Fetched 0 total friends ids for ubbayreuth_info
Fetched 354 total followers ids for ubbayreuth_info
Report for ulbbonn:
===================

File saved as ulbbonn_NetWork_2014-04-06.csv

Friends: 36
Followers: 410
followBack: 20
XFollowsNotBack: 390
NotFollowXBack: 16
activeNotFollowRatio: 0.95
passiveNotFollowRatio: 0.44

==================================================

Fetched 239 total friends ids for ub_bi
Fetched 273 total followers ids for ub_bi
Report for ubbayreuth_info:
===========================

File saved as ubbayreuth_info_NetWork_2014-04-06.csv

Friends: 0
Followers: 354
followBack: 0
XFollowsNotBack: 354
NotFollowXBack: 0
activeNotFollowRatio: 1.0
passiveNotFollowRatio: 0

==================================================

Encountered 429 Error (Rate Limit Exceeded)
Retrying in 15 minutes...ZzZ...
...ZzZ...Awake now and trying again.
Fetched 1 total friends ids for unibib_bs
Fetched 123 total followers ids for unibib_bs
Report for ub_bi:
=================

File saved as ub_bi_NetWork_2014-04-06.csv

Friends: 239
Followers: 273
followBack: 65
XFollowsNotBack: 208
NotFollowXBack: 174
activeNotFollowRatio: 0.76
passiveNotFollowRatio: 0.73

==================================================

Fetched 17 total friends ids for ub_wue
Fetched 220 total followers ids for ub_wue
Report for unibib_bs:
=====================

File saved as unibib_bs_NetWork_2014-04-06.csv

Friends: 1
Followers: 123
followBack: 0
XFollowsNotBack: 123
NotFollowXBack: 1
activeNotFollowRatio: 1.0
passiveNotFollowRatio: 1.0

==================================================

Fetched 12 total friends ids for unibib
Fetched 1067 total followers ids for unibib
Report for ub_wue:
==================

File saved as ub_wue_NetWork_2014-04-06.csv

Friends: 17
Followers: 220
followBack: 8
XFollowsNotBack: 212
NotFollowXBack: 9
activeNotFollowRatio: 0.96
passiveNotFollowRatio: 0.53

==================================================

Fetched 34 total friends ids for ubdue
Fetched 795 total followers ids for ubdue
Report for unibib:
==================

File saved as unibib_NetWork_2014-04-06.csv

Friends: 12
Followers: 1067
followBack: 10
XFollowsNotBack: 1057
NotFollowXBack: 2
activeNotFollowRatio: 0.99
passiveNotFollowRatio: 0.17

==================================================

Fetched 24 total friends ids for ub_fau
Fetched 432 total followers ids for ub_fau
Report for ubdue:
=================

File saved as ubdue_NetWork_2014-04-06.csv

Friends: 34
Followers: 795
followBack: 24
XFollowsNotBack: 771
NotFollowXBack: 10
activeNotFollowRatio: 0.97
passiveNotFollowRatio: 0.29

==================================================

Fetched 1025 total friends ids for tibub
Fetched 1571 total followers ids for tibub
Report for ub_fau:
==================

File saved as ub_fau_NetWork_2014-04-06.csv

Friends: 24
Followers: 432
followBack: 19
XFollowsNotBack: 413
NotFollowXBack: 5
activeNotFollowRatio: 0.96
passiveNotFollowRatio: 0.21

==================================================

Fetched 136 total friends ids for ubkassel
Fetched 172 total followers ids for ubkassel
Report for tibub:
=================

File saved as tibub_NetWork_2014-04-06.csv

Friends: 1025
Followers: 1571
followBack: 445
XFollowsNotBack: 1126
NotFollowXBack: 580
activeNotFollowRatio: 0.72
passiveNotFollowRatio: 0.57

==================================================

Fetched 232 total friends ids for ubleipzig
Fetched 1160 total followers ids for ubleipzig
Report for ubkassel:
====================

File saved as ubkassel_NetWork_2014-04-06.csv

Friends: 136
Followers: 172
followBack: 49
XFollowsNotBack: 123
NotFollowXBack: 87
activeNotFollowRatio: 0.72
passiveNotFollowRatio: 0.64

==================================================

Fetched 1066 total friends ids for ubmainz
Fetched 653 total followers ids for ubmainz
Report for ubleipzig:
=====================

File saved as ubleipzig_NetWork_2014-04-06.csv

Friends: 232
Followers: 1160
followBack: 118
XFollowsNotBack: 1042
NotFollowXBack: 114
activeNotFollowRatio: 0.9
passiveNotFollowRatio: 0.49

==================================================

Fetched 49 total friends ids for unibib_mr
Fetched 307 total followers ids for unibib_mr
Report for ubmainz:
===================

File saved as ubmainz_NetWork_2014-04-06.csv

Friends: 1066
Followers: 653
followBack: 602
XFollowsNotBack: 51
NotFollowXBack: 464
activeNotFollowRatio: 0.08
passiveNotFollowRatio: 0.44

==================================================

Fetched 254 total friends ids for ubreg
Fetched 751 total followers ids for ubreg
Report for unibib_mr:
=====================

File saved as unibib_mr_NetWork_2014-04-06.csv

Friends: 49
Followers: 307
followBack: 27
XFollowsNotBack: 280
NotFollowXBack: 22
activeNotFollowRatio: 0.91
passiveNotFollowRatio: 0.45

==================================================

Fetched 2 total friends ids for zbsport
Fetched 503 total followers ids for zbsport
Report for ubreg:
=================

File saved as ubreg_NetWork_2014-04-06.csv

Friends: 254
Followers: 751
followBack: 96
XFollowsNotBack: 655
NotFollowXBack: 158
activeNotFollowRatio: 0.87
passiveNotFollowRatio: 0.62

==================================================

Report for zbsport:
===================

File saved as zbsport_NetWork_2014-04-06.csv

Friends: 2
Followers: 503
followBack: 2
XFollowsNotBack: 501
NotFollowXBack: 0
activeNotFollowRatio: 1.0
passiveNotFollowRatio: 0.0

==================================================

Public Libraries


In [7]:
wrapUp('OeBib_BasicStats_2014-04-06.csv')


Fetched 15 total friends ids for stb_bielefeld
Fetched 358 total followers ids for stb_bielefeld
Fetched 32 total friends ids for stabi_bremen
Fetched 981 total followers ids for stabi_bremen
Report for stb_bielefeld:
=========================

File saved as stb_bielefeld_NetWork_2014-04-06.csv

Friends: 15
Followers: 358
followBack: 9
XFollowsNotBack: 349
NotFollowXBack: 6
activeNotFollowRatio: 0.97
passiveNotFollowRatio: 0.4

==================================================

Fetched 77 total friends ids for stbessen
Fetched 357 total followers ids for stbessen
Report for stabi_bremen:
========================

File saved as stabi_bremen_NetWork_2014-04-06.csv

Friends: 32
Followers: 981
followBack: 19
XFollowsNotBack: 962
NotFollowXBack: 13
activeNotFollowRatio: 0.98
passiveNotFollowRatio: 0.41

==================================================

Fetched 1065 total friends ids for stbibkoeln
Fetched 2120 total followers ids for stbibkoeln
Report for stbessen:
====================

File saved as stbessen_NetWork_2014-04-06.csv

Friends: 77
Followers: 357
followBack: 35
XFollowsNotBack: 322
NotFollowXBack: 42
activeNotFollowRatio: 0.9
passiveNotFollowRatio: 0.55

==================================================

Fetched 917 total friends ids for stadtbueduedorf
Fetched 433 total followers ids for stadtbueduedorf
Report for stbibkoeln:
======================

File saved as stbibkoeln_NetWork_2014-04-06.csv

Friends: 1065
Followers: 2120
followBack: 738
XFollowsNotBack: 1382
NotFollowXBack: 327
activeNotFollowRatio: 0.65
passiveNotFollowRatio: 0.31

==================================================

Fetched 131 total friends ids for hoeb4u
Fetched 208 total followers ids for hoeb4u
Report for stadtbueduedorf:
===========================

File saved as stadtbueduedorf_NetWork_2014-04-06.csv

Friends: 917
Followers: 433
followBack: 271
XFollowsNotBack: 162
NotFollowXBack: 646
activeNotFollowRatio: 0.37
passiveNotFollowRatio: 0.7

==================================================

Fetched 50 total friends ids for bibliothek_wit
Fetched 51 total followers ids for bibliothek_wit
Report for hoeb4u:
==================

File saved as hoeb4u_NetWork_2014-04-06.csv

Friends: 131
Followers: 208
followBack: 36
XFollowsNotBack: 172
NotFollowXBack: 95
activeNotFollowRatio: 0.83
passiveNotFollowRatio: 0.73

==================================================

Fetched 850 total friends ids for mediothek
Encountered 429 Error (Rate Limit Exceeded)
Retrying in 15 minutes...ZzZ...
...ZzZ...Awake now and trying again.
Fetched 667 total followers ids for mediothek
Report for bibliothek_wit:
==========================

File saved as bibliothek_wit_NetWork_2014-04-06.csv

Friends: 50
Followers: 51
followBack: 20
XFollowsNotBack: 31
NotFollowXBack: 30
activeNotFollowRatio: 0.61
passiveNotFollowRatio: 0.6

==================================================

Fetched 497 total friends ids for stabi_erlangen
Fetched 986 total followers ids for stabi_erlangen
Report for mediothek:
=====================

File saved as mediothek_NetWork_2014-04-06.csv

Friends: 850
Followers: 667
followBack: 226
XFollowsNotBack: 441
NotFollowXBack: 624
activeNotFollowRatio: 0.66
passiveNotFollowRatio: 0.73

==================================================

Fetched 394 total friends ids for stabifr
Fetched 623 total followers ids for stabifr
Report for stabi_erlangen:
==========================

File saved as stabi_erlangen_NetWork_2014-04-06.csv

Friends: 497
Followers: 986
followBack: 344
XFollowsNotBack: 642
NotFollowXBack: 153
activeNotFollowRatio: 0.65
passiveNotFollowRatio: 0.31

==================================================

Fetched 91 total friends ids for stabigoe
Fetched 333 total followers ids for stabigoe
Report for stabifr:
===================

File saved as stabifr_NetWork_2014-04-06.csv

Friends: 394
Followers: 623
followBack: 183
XFollowsNotBack: 440
NotFollowXBack: 211
activeNotFollowRatio: 0.71
passiveNotFollowRatio: 0.54

==================================================

Fetched 585 total friends ids for stbneuss
Fetched 397 total followers ids for stbneuss
Report for stabigoe:
====================

File saved as stabigoe_NetWork_2014-04-06.csv

Friends: 91
Followers: 333
followBack: 69
XFollowsNotBack: 264
NotFollowXBack: 22
activeNotFollowRatio: 0.79
passiveNotFollowRatio: 0.24

==================================================

Fetched 192 total friends ids for stbsalzgitter
Fetched 229 total followers ids for stbsalzgitter
Report for stbneuss:
====================

File saved as stbneuss_NetWork_2014-04-06.csv

Friends: 585
Followers: 397
followBack: 353
XFollowsNotBack: 44
NotFollowXBack: 232
activeNotFollowRatio: 0.11
passiveNotFollowRatio: 0.4

==================================================

Fetched 28 total friends ids for stabiso
Fetched 328 total followers ids for stabiso
Report for stbsalzgitter:
=========================

File saved as stbsalzgitter_NetWork_2014-04-06.csv

Friends: 192
Followers: 229
followBack: 102
XFollowsNotBack: 127
NotFollowXBack: 90
activeNotFollowRatio: 0.55
passiveNotFollowRatio: 0.47

==================================================

Fetched 1021 total friends ids for sbchemnitz
Fetched 1103 total followers ids for sbchemnitz
Report for stabiso:
===================

File saved as stabiso_NetWork_2014-04-06.csv

Friends: 28
Followers: 328
followBack: 16
XFollowsNotBack: 312
NotFollowXBack: 12
activeNotFollowRatio: 0.95
passiveNotFollowRatio: 0.43

==================================================

Fetched 169 total friends ids for stabiguetersloh
Fetched 445 total followers ids for stabiguetersloh
Report for sbchemnitz:
======================

File saved as sbchemnitz_NetWork_2014-04-06.csv

Friends: 1021
Followers: 1103
followBack: 347
XFollowsNotBack: 756
NotFollowXBack: 674
activeNotFollowRatio: 0.69
passiveNotFollowRatio: 0.66

==================================================

Fetched 264 total friends ids for stabi_mannheim
Fetched 473 total followers ids for stabi_mannheim
Report for stabiguetersloh:
===========================

File saved as stabiguetersloh_NetWork_2014-04-06.csv

Friends: 169
Followers: 445
followBack: 87
XFollowsNotBack: 358
NotFollowXBack: 82
activeNotFollowRatio: 0.8
passiveNotFollowRatio: 0.49

==================================================

Fetched 17 total friends ids for stadtbibliothek
Fetched 283 total followers ids for stadtbibliothek
Report for stabi_mannheim:
==========================

File saved as stabi_mannheim_NetWork_2014-04-06.csv

Friends: 264
Followers: 473
followBack: 128
XFollowsNotBack: 345
NotFollowXBack: 136
activeNotFollowRatio: 0.73
passiveNotFollowRatio: 0.52

==================================================

Fetched 703 total friends ids for stadtbibmg
Fetched 319 total followers ids for stadtbibmg
Report for stadtbibliothek:
===========================

File saved as stadtbibliothek_NetWork_2014-04-06.csv

Friends: 17
Followers: 283
followBack: 10
XFollowsNotBack: 273
NotFollowXBack: 7
activeNotFollowRatio: 0.96
passiveNotFollowRatio: 0.41

==================================================

Fetched 3 total friends ids for buecherei_ms
Fetched 108 total followers ids for buecherei_ms
Report for stadtbibmg:
======================

File saved as stadtbibmg_NetWork_2014-04-06.csv

Friends: 703
Followers: 319
followBack: 167
XFollowsNotBack: 152
NotFollowXBack: 536
activeNotFollowRatio: 0.48
passiveNotFollowRatio: 0.76

==================================================

Fetched 193 total friends ids for stabuewuerzburg
Fetched 412 total followers ids for stabuewuerzburg
Report for buecherei_ms:
========================

File saved as buecherei_ms_NetWork_2014-04-06.csv

Friends: 3
Followers: 108
followBack: 1
XFollowsNotBack: 107
NotFollowXBack: 2
activeNotFollowRatio: 0.99
passiveNotFollowRatio: 0.67

==================================================

Report for stabuewuerzburg:
===========================

File saved as stabuewuerzburg_NetWork_2014-04-06.csv

Friends: 193
Followers: 412
followBack: 103
XFollowsNotBack: 309
NotFollowXBack: 90
activeNotFollowRatio: 0.75
passiveNotFollowRatio: 0.47

==================================================


In [ ]: